
package game1.characters;
import java.util.Random;
import java.awt.Point;

/**
 * Contains basic information about all monsters (attackable NPC's)
 * @author Brien Croft
 * @version 0.1, 12/09/09
 */
public class Monster extends NPC implements Attackable {

    private int health;
    private Random random = new Random();

    /**
     * Creates a monster with a set amount of health.
     * @param name
     * @param description
     * @param h
     * param loc
     */
    public Monster(String name,String description,int h,Point loc) {
        super(name,description,loc);
        health = h;
    }

    /**
     * Creates a monster with a random amount of health.
     * @param name
     * @param description
     * @param maxh
     * @param minh
     * @param loc
     */
    public Monster(String name,String description,int maxh,int minh,Point loc){
        super(name,description,loc);
        health = random.nextInt(maxh - minh) + minh;
    }
    
    /**
     * Attacks a character.
     * @param c The character being attacked.
     * @return The amount of damage done.
     */
    public int attack(Character c){
        return 0;
    }

    /**
     * Takes damage dealt by a character.
     * @param c
     * @param damage
     */
    public void takeDamage(Character c, int damage) {
        return;
    }

    /**
     * Invoked when monster has no health remaining.  Performs neccessary cleanup.
     */
    public void die() {
        return;
    }
    /**
     * Creates an instance of the monster at the location specified.
     * @param loc The location to spawn at.
     */
    public void spawn(Point loc) {
        return;
    }


}
